﻿@{ 
    Layout = null;
}
<script src="@Url.Content("~/Scripts/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/focus.js")" type="text/javascript"></script>
<link type="text/css" href="@Url.Content("~/Content/deskTopStyle.css")" rel="stylesheet"  />

<script src="@Url.Content("~/Scripts/swfobject.js")" type="text/javascript"></script>
@using ElingOA6_Admin_DSJCJ.Areas.Admin.Models;
@using ElingOA6_Admin_DSJCJ.Common;
@using System.Data;
@model  Dictionary<string, List<DocumentGridModel>> 
@{ 
    List<DocumentGridModel> documentList = new List<DocumentGridModel>();
    List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry> ShowConfigEnryList = new List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry>();
    int entryCount = 0;
    string key = "";//系统配置关键字


    string jsAlert = ViewData["jsAlert"] != null ? ViewData["jsAlert"].ToString() : "";
    string empName = ViewData["EmpName"] == null ? "" : ViewData["EmpName"].ToString();
    string deptName = ViewData["DeptName"] == null ? "" : ViewData["DeptName"].ToString();
    List<ElingOA6_Admin_DSJCJ.Model.Config> configList = ViewData["configList"] == null ? new List<ElingOA6_Admin_DSJCJ.Model.Config>() : ViewData["configList"] as List<ElingOA6_Admin_DSJCJ.Model.Config>;
    List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry> configEntryList = ViewData["configEntryList"] == null ? new List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry>() : ViewData["configEntryList"] as List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry>;
    Dictionary<string, string> zlOldDic = ViewData["zlOldDic"] == null ? new Dictionary<string, string>() : ViewData["zlOldDic"] as Dictionary<string, string>;
    string zhcsUrl = System.Configuration.ConfigurationManager.AppSettings["zhcsUrl"].ToString();
}
@helper  GetConfigShowText(string keyName, string configClass, List<ElingOA6_Admin_DSJCJ.Model.Config> configList)
    {
        List<ElingOA6_Admin_DSJCJ.Model.Config> tmpList = configList.Where(s => s.FKeyName == keyName && s.FConfigClass == configClass).ToList();
        if (tmpList.Count > 0)
        {
    @:@tmpList[0].FShowText
        }

}
@helper  GetConfigValue(string keyName, string configClass, List<ElingOA6_Admin_DSJCJ.Model.Config> configList)
    {
        List<ElingOA6_Admin_DSJCJ.Model.Config> tmpList = configList.Where(s => s.FKeyName == keyName && s.FConfigClass == configClass).ToList();
        if (tmpList.Count > 0)
        {
    @:@tmpList[0].FKeyValue
        }

}
@helper  GetConfigEntryShowText(string FDocClsCd, string keyName, string configClass, List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry> configEntryList)
    {
        List<ElingOA6_Admin_DSJCJ.Model.ConfigEntry> tmpEntryList = configEntryList.Where(s => s.FDocClsCd == FDocClsCd && s.FKeyName == keyName && s.FConfigClass == configClass).ToList();
        if (tmpEntryList.Count > 0)
        {
    @:@tmpEntryList[0].FShowText
        }
    }
        
        
@helper  GetConfigValueLi(string keyName, string configClass, List<ElingOA6_Admin_DSJCJ.Model.Config> configList)
    {
        
        List<ElingOA6_Admin_DSJCJ.Model.Config> tmpList = configList.Where(s => s.FKeyName == keyName && s.FConfigClass == configClass).ToList();
        if (tmpList.Count > 0)
        {
            ElingOA6_Admin_DSJCJ.Model.Config tmpModel = tmpList[0];
            if (tmpModel.FIsWithDocCls == "Y")
            {
                <a href="/Index/DocumentIndex?keyName=@keyName&keyClass=@configClass" target="_blank">@tmpModel.FShowText</a>
            }
            else
            {
                <a href="@tmpModel.FKeyValue" target="_blank">@tmpModel.FShowText</a>
            }
        }
    }


@if (false)
{
    <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
}

<!DOCTYPE html>

<html>
<head>
    <title>Index</title>
    <script type="text/javascript">
        $(function () {
            if ('@ViewData["EmpName"].ToString()' != "") {
                loginShow('@ViewData["EmpName"]', '@ViewData["DeptName"]');
            } else {
                logShow();
            }
        });

        /*搜索*/
        function query() {
            //        var keyName = $("#selChooseDocCls").val();
            var keyName = "-1";
            var keyText = $.trim($('#txtQueryText').val());
            keyText = escape(keyText);
            if (keyText == "") {
                alert("请输入关键字");
            }
            else {
                window.open("/Index/DocQueryList?keyName=" + keyName + "&keyText=" + keyText, "");
            }
        }

        function logShow() {
            document.getElementById("logInput").style.display = "block";
            document.getElementById("logSuccess").style.display = "none";
        }

        function loginShow(empName, deptName) {
            document.getElementById("logInput").style.display = "none";
            document.getElementById("logSuccess").style.display = "block";

        }
    </script>

    <script>

        function iframeAutoFit() {
            var ex;
            try {
                if (window != parent) {
                    var a = parent.document.getElementsByTagName("IFRAME");
                    for (var i = 0; i < a.length; i++) {
                        if (a[i].contentWindow == window) {
                            var h1 = 0, h2 = 0;
                            if (document.documentElement && document.documentElement.scrollHeight) {
                                h1 = document.documentElement.scrollHeight;
                            }
                            if (document.body) h2 = document.body.scrollHeight;
                            var h = Math.max(h1, h2);
                            if (window.ActiveXObject) { h += 4; }
                            else { h += 4; }
                            a[i].style.height = h + "px";
                            window.removeEventListener('resize', iframeAutoFit, false); //兼容谷歌浏览器时要去掉RISZE监听
                        }
                    }
                }
            }
            catch (ex) { }
        }
    
    </script>

</head>
<body onload="iframeAutoFit()">
<div class="nav">
    <ul>
        <li><a href="/" target="_blank">首页</a></li>
        <li>@GetConfigValueLi("doc_dwjj", "01", configList)</li>
        <li>@GetConfigValueLi("doc_ksdt", "01", configList)</li>
        <li>@GetConfigValueLi("doc_dtfg", "01", configList)</li>
        <li>@GetConfigValueLi("doc_dflz", "01", configList)</li>
        <li>@GetConfigValueLi("doc_ztzl", "01", configList)</li>
        <li>@GetConfigValueLi("doc_xxyd", "01", configList)</li>
        <li>@GetConfigValueLi("doc_xxph", "01", configList)</li>
        <li>@GetConfigValueLi("doc_txl", "01", configList)</li>
        <li>@GetConfigValueLi("doc_xzzx", "01", configList)</li>
    </ul>
</div>
<div class="wrap">
    <div class="main">
        <div class="main-content">
            <div class="newspic">
                <div class="sub_box">
                    <div id="p-select" class="sub_nav">
                        <div class="sub_more">
                            <a href="/Index/DocumentIndex?keyName=doc_tpxw&keyClass=04" onfocus="this.blur()" title=""
                                style="font-family: Tahoma; font-size: 12px;" target="_blank">更多>></a></div>
                        <div class="sub_no" id="bd1lfsj">
                            @Html.Raw(@ViewData["Select_btn"].ToString())
                        </div>
                    </div>
                    <div id="bd1lfimg">
                        @Html.Raw(@ViewData["Picshow_img"].ToString())
                    </div>
                </div>

                <script type="text/javascript">                    movec();</script>

            </div>
            <div class="div1" style="width: 385px;height:268px; margin-left: 10px;">
                <div class="title1">
                    <h3>@GetConfigShowText("doc_dsxx", "04", configList)</h3>
                    <span><a href="/Index/DocumentIndex?keyName=doc_dsxx&keyClass=04" target="_blank">更多>></a></span>
                </div>
                <ul class="content1">
                    @{documentList = new List<DocumentGridModel>();
                      key = "doc_dxss_04";
                      if (Model.ContainsKey(key))
                      {
                          documentList = Model[key];
                      }
                                                          
                        }
                        @foreach (DocumentGridModel documentModel in documentList)
                        {
                            <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
                        }
                </ul>
            </div>
            <div class="div2" style="width: 370px;height:186px;">
                <div class="title2">
                    <h4>@GetConfigShowText("doc_jxgl", "04", configList)</h4>
                    <span><a href="/Index/DocumentIndex?keyName=doc_jxgl&keyClass=04" target="_blank">更多>></a></span></div>
                <ul class="content2">
                    @{documentList = new List<DocumentGridModel>();
                      key = "doc_jxgl_04";
                      if (Model.ContainsKey(key))
                      {
                          documentList = Model[key];
                      }
                                                          
                        }
                        @foreach (DocumentGridModel documentModel in documentList)
                        {
                            <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
                        }
                </ul>
            </div>
            <div class="div2" style="width: 370px;height:186px; margin-left: 10px; float: left;">
                <div class="title2">
                    <h4>@GetConfigShowText("doc_ksdt", "04", configList)</h4>
                    <span><a href="/Index/DocumentIndex?keyName=doc_ksdt&keyClass=04" target="_blank">更多>></a></span></div>
                <ul class="content2">
                    @{documentList = new List<DocumentGridModel>();
                      key = "doc_ksdt_04";
                      if (Model.ContainsKey(key))
                      {
                          documentList = Model[key];
                      }
                                                          
                        }
                        @foreach (DocumentGridModel documentModel in documentList)
                        {
                            <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
                        }
                </ul>
            </div>
            <div class="div2" style="width: 370px;height:186px;">
                <div class="title2">
                    <h4>@GetConfigShowText("doc_tpxw", "04", configList)</h4>
                    <span><a href="/Index/DocumentIndex?keyName=doc_tpxw&keyClass=04" target="_blank">更多>></a></span></div>
                <ul class="content2">
                    @{documentList = new List<DocumentGridModel>();
                      key = "doc_tpxw_04";
                      if (Model.ContainsKey(key))
                      {
                          documentList = Model[key];
                      }
                                                          
                        }
                        @foreach (DocumentGridModel documentModel in documentList)
                        {
                            <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
                        }
                </ul>
            </div>
            <div class="div2" style="width: 370px;height:186px; margin-left: 10px; float: left;">
                <div class="title2">
                    <h4>@GetConfigShowText("doc_tzgg", "04", configList)</h4>
                    <span><a href="/Index/DocumentIndex?keyName=doc_tzgg&keyClass=04" target="_blank">更多>></a></span></div>
                <ul class="content2">
                    @{documentList = new List<DocumentGridModel>();
                      key = "doc_tzgg_04";
                      if (Model.ContainsKey(key))
                      {
                          documentList = Model[key];
                      }
                                                          
                        }
                        @foreach (DocumentGridModel documentModel in documentList)
                        {
                            <li><span>@documentModel.FPubDate.ToString("yyyy-MM-dd")</span><a href="/Index/DocView?docId=@documentModel.FDocId" target="_blank" title="@documentModel.FTitle">@documentModel.FTitle</a></li>
                        }
                </ul>
            </div>
        </div>
     @*   <div class="main-right">
            <div class="zhcs">
                <div id="logInput" style="display: block">
                  <a href="@zhcsUrl"><img src="@Url.Content("~/Content/images/desktop/PleaseLogin.jpg")" alt="点击进入"/></a>
                </div>
                <div id="logSuccess" style="display: none">
                  <a href="@zhcsUrl"><img src="@Url.Content("~/Content/images/desktop/HasLogin.jpg")" alt="点击进入"/></a>
                </div>
            </div>
            <div class="rightdiv">
                <div class="rightdiv-title">
                    <b>科室导航</b>
                </div>
                <div class="rightdiv-con department">
                    <a href="/Index/DocumentIndex?keyName=dept_bgs&keyClass=06" target="_blank">@GetConfigShowText("dept_bgs", "06", configList)</a>
                    <a href="/Index/DocumentIndex?keyName=dept_nspgk&keyClass=06" target="_blank">@GetConfigShowText("dept_nspgk", "06", configList)</a>
                    <a href="/Index/DocumentIndex?keyName=dept_szfgk&keyClass=06" target="_blank">@GetConfigShowText("dept_szfgk", "06", configList)</a>
                    <a href="/Index/DocumentIndex?keyName=dept_zgfwk&keyClass=06" target="_blank">@GetConfigShowText("dept_zgfwk", "06", configList)</a>
                    <a href="/Index/DocumentIndex?keyName=dept_slhsk&keyClass=06" target="_blank">@GetConfigShowText("dept_slhsk", "06", configList)</a>
                    <a href="/Index/DocumentIndex?keyName=dept_syglk&keyClass=06" target="_blank">@GetConfigShowText("dept_syglk", "06", configList)</a>
                </div>
            </div>
            <div class="div1" style="width: 234px;">
                <div class="title1">
                    <h3>
                        站内搜索</h3>
                    </div>
                <ul class="content1">
                    <div class="search">
                        <input id="txtQueryText" name="txtQueryText" type="text" style="width: 156px; height: 26px; border: #a9cfe5 1px solid;
                            float: left;" /><input name="imageField" type="image" src="@Url.Content("~/Content/images/desktop/search.jpg")" onclick="query()"/>
                    </div>
                </ul>
            </div>
            <div class="rightdiv">
                <div class="rightdiv-title">
                    <b>站点导航</b></div>
                <div class="rightdiv-con">
                    <div class="site">
                        <a href="@GetConfigValue("link_nbcs", "02", configList)" target="_blank">
                            <img src="@Url.Content("~/Content/images/desktop/08.jpg")">
                        </a> 
                        <a href="@GetConfigValue("link_gwh", "02", configList)" target="_blank">
                            <img src="@Url.Content("~/Content/images/desktop/09.jpg")">
                        </a> 
                    <span>

                        @{Dictionary<string, List<ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry>> dicLinkTypeList = new Dictionary<string, List<ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry>>();
                          Dictionary<string, string> dicLinkNameList = new Dictionary<string, string>();
                          if (ViewData["dicLinkTypeList"] != null)
                          {
                              dicLinkTypeList = ViewData["dicLinkTypeList"] as Dictionary<string, List<ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry>>;
                          }
                          if (ViewData["dicLinkNameList"] != null)
                          {
                              dicLinkNameList = ViewData["dicLinkNameList"] as Dictionary<string, string>;
                          }
                          string tempLinkName = "";
                          List<ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry> tempLinkTypeEntryList = new List<ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry>();
                        }
                        <select onchange="linkTypeChanged(this)" style="width: 222px; height: 20px;">
                        @{
                            tempLinkName = dicLinkNameList["01"];
                            tempLinkTypeEntryList = dicLinkTypeList["01"];
                            <option value="">------@tempLinkName------</option>    
                            if (tempLinkTypeEntryList.Count > 0)
                            {
                                foreach (ElingOA6_Admin_DSJCJ.Model.LinkTypeEntry tempLinkTypeEntryModel in tempLinkTypeEntryList)
                                {
                                     <option title="@tempLinkTypeEntryModel.FLinkURL">------@tempLinkTypeEntryModel.FLinkText------</option>
                                }
                            }
                            }
                        </select>

                    </span>
                    </div>
                </div>
            </div>
        </div>*@
       @* <div class="project">

            <script src="@Url.Content("~/Scripts/ScrollPic.js")" type="text/javascript"></script>

            <div class="rollphotos">
                <div class="blk_29">
                    <div class="LeftBotton" id="LeftArr">
                    </div>
                    <div class="Cont" id="ISL_Cont_1">
                        @{
                            foreach (KeyValuePair<string, string> dicZl in zlOldDic)
                            {
                                <div class="box">
                                    <a class="imgBorder" href="/Column/ZtzlColumn?clsCd=@dicZl.Key" target="_blank">
                                        <img width="186" height="47" src="@dicZl.Value" />
                                    </a>
                                </div>
                            }
                        }
                    </div>
                    <div class="RightBotton" id="RightArr">
                    </div>
                </div>

                <script language="javascript" type="text/javascript">
		<!--                    //--><![CDATA[//><!--
                    var scrollPic_02 = new ScrollPic();
                    scrollPic_02.scrollContId = "ISL_Cont_1"; //内容容器ID
                    scrollPic_02.arrLeftId = "LeftArr"; //左箭头ID
                    scrollPic_02.arrRightId = "RightArr"; //右箭头ID

                    scrollPic_02.frameWidth = 908; //显示框宽度
                    scrollPic_02.pageWidth = 186; //翻页宽度

                    scrollPic_02.speed = 10; //移动速度(单位毫秒，越小越快)
                    scrollPic_02.space = 10; //每次移动像素(单位px，越大越快)
                    scrollPic_02.autoPlay = false; //自动播放
                    scrollPic_02.autoPlayTime = 3; //自动播放间隔时间(秒)

                    scrollPic_02.initialize(); //初始化

                    //--><!]]>
                </script>

            </div>
        </div>*@
    </div>
</div>

<script type="text/javascript">
    swfobject.registerObject("FlashID");
</script>









@{
    List<ElingOA6_Admin_DSJCJ.Model.Ad> adFDList = ViewData["adFDList"] as List<ElingOA6_Admin_DSJCJ.Model.Ad>;
    List<ElingOA6_Admin_DSJCJ.Model.Ad> adDLList = ViewData["adDLList"] as List<ElingOA6_Admin_DSJCJ.Model.Ad>;
    List<ElingOA6_Admin_DSJCJ.Model.Ad> adQPList = ViewData["adQPList"] as List<ElingOA6_Admin_DSJCJ.Model.Ad>;
              
              
            }

             <!--浮动图片 -->
    <div>
        @for (int i = 0; i <= adFDList.Count() - 1; i++)
        {
            int imgWidth = null == adFDList[i].FAdWidth ? 0 : adFDList[i].FAdWidth.Value;
            int imgHeight = null == adFDList[i].FAdHeight ? 0 : adFDList[i].FAdHeight.Value;
            string imgUrl = adFDList[i].FSvrFileName == "" ? "##" : adFDList[i].FSvrFileName;
            string divid = "ad" + i;
            string closeDivId = "close" + i;
            <div id="@divid" style="z-index: 1001; position: absolute; text-align: right">
                <!--浮动开始-->
                <div id="@closeDivId" style="position: absolute; width: 100%" align="right">
                    <img src="/Content/images/desktop/del.gif" border="0" style="cursor: pointer" onclick="document.getElementById('@divid').style.display='none'" />
                </div>
                <a href="@adFDList[i].FAdUrl" target="@adFDList[i].FAdUrl">
                    <img src="@imgUrl" width="@imgWidth" height="@imgHeight" border="0" />
                    @*<img src="@imgUrl" width="@imgWidth" height="@imgHeight" border="0" />*@
                    </a>
                <!--浮动结束-->
            </div>

            <script type="text/javascript">
                document.getElementById("@divid").style.width = "@imgWidth" + "px";
            </script>

        }
        <script type="text/javascript">
            var ct = "@adFDList.Count()";
            for (var i = 0; i < ct; i++) {
                var ad = new AdMove("ad" + i);
                ad.Run();
            }
        </script>
    </div>
    <!--对联广告 -->
    @foreach (var item in adDLList)
    {
        <div id="LeftDiv" style="position: absolute; border: 1px solid #336699; background-color: #EEEEE2; z-index: 1000; top: -1000px; word-break: break-all; display: none;" runat="server">
        <div align="right" style="position: absolute; top: 0px; right: 0px; margin: 2px; padding: 2px; z-index: 2000;">
            <a href="javascript:;" onclick="hidead()" style="color: red; text-decoration: none; font-size: 12px;">关闭</a>
        </div>
        <div>
            <div align="center">
                <a runat="server" id="leftA" href="@item.leftHRef" target="@item.leftTarget">
                    <img id="leftImage" width="@item.leftWidth" height="@item.leftHeight" src="@item.leftImageUrl"  />
                    </a></div>
        </div>
    </div>
    <div id="RightDiv" style="position: absolute; border: 1px solid #336699; background-color: #EEEEE2; z-index: 1000; top: -1000px; word-break: break-all; display: none;" runat="server">
        <div align="right" style="position: absolute; top: 0px; right: 0px; margin: 2px; padding: 2px; z-index: 2000;">
            <a href="javascript:;" onclick="hidead()" style="color: red; text-decoration: none; font-size: 12px;">关闭</a>
        </div>
        <div>
            <div align="center">
                <a runat="server" id="rightA" href="@item.rightHRef" target="@item.rightTarget">
                    <img id="rightImage" width="@item.rightWidth" height="@item.rightHeight" src="@item.rightImageUrl" />
                    </a></div>
        </div>
    </div>
    }
    @if (adQPList.Count() > 0)
    {
    @Html.Hidden("hidCouPleZt", ViewData["hidCouPleZt"])
    <script src="@Url.Content("~/Scripts/coupletImg.js")" type="text/javascript"></script>
    }

</body>
</html>
